package cl.crabcom.shoppinglist;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import android.view.View;
import android.view.View.OnClickListener;

public class ShoppingList extends Activity implements OnClickListener {
	
	
	/** Called when the activity is first created. */
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		View addStore = findViewById(R.id.store);
		View showList = findViewById(R.id.list);
		addStore.setOnClickListener(this);
		showList.setOnClickListener(this);
	}

	public void onClick(View v) {

		switch (v.getId()) {
			case R.id.store:
				Intent i = new Intent(this, ShowStore.class);
				startActivity(i);
				break;
				
			case R.id.list:
				Intent iShowList = new Intent(this,ShowList.class);
				startActivity(iShowList);
				break;
		}
	}
}